import {Filter} from "../../../web/_Filter"
import {Component} from "../../anno/Component"

const bodyParser = require("body-parser")
const parser = bodyParser.json()


@Component()
export class BodyParserFilter extends Filter {
  doFilter(req: HttpRequest, res: HttpResponse, next: (req: HttpRequest, res: HttpResponse) => void): void {
    parser(req, res, next)
  }

}
